<template>
  <div>
    <com-a @my-event="onComA"></com-a>
    <input v-model="myValue"/>
    {{myValue}}
    <input v-model="myBox" value="apple" type="checkbox"/>
    <input v-model="myBox" value="banana" type="checkbox"/>
    <input v-model="myBox" value="pinapple" type="checkbox"/>
    {{myBox}}
  </div>
</template>

<script>
  import comA from './components/a'
export default {
  components:{
    comA
  },
  data(){
    return {
      myValue:'test',
      myBox:[]
    }
  },
  methods:{
    onComA(input){
      console.log('点击了a.vue'+input);
    }
  }

}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
